Quicksort: Combining Concurrency, Recursion, and Mutable Data Structures

نویسندگان

  • David Kitchin
  • Adrian Quark
  • Jayadev Misra
چکیده

Quicksort [5] remains one of the most studied algorithms in computer science. It is important not only as a practical sorting method, but also as a splendid teaching aid for introducing recursion and systematic algorithm development. The algorithm has been studied extensively; so, it is natural to assume that everything that needs to be said about it has already been said. Yet, in attempting to code it using a recent programming language of our design, we discovered that its structure is more clearly expressed as a concurrent program that manipulates a shared mutable store, without any locking or explicit synchronization. In this paper, we describe the essential aspects of our programming language Orc [8], show a number of examples that combine its features in various forms, and then develop a concise description of Quicksort. We hope to highlight the importance of including concurrency, recursion and mutability within a single theory.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Overview of Separation Logic

After some general remarks about program verification, we introduce separation logic, a novel extension of Hoare logic that can strengthen the applicability and scalability of program verification for imperative programs using shared mutable data structures or sharedmemory concurrency.

متن کامل

Calypso: A Visual Language for Data Structures Programming

Data structures are more easily understood when they are presented visually rather than textually. We have developed a system, Calypso, to allow the visual definition of data structures programs using pictorial pattern/action pairs in an imperative setting. We present several examples including rebalancing an AVL tree and sorting an array using the Quicksort algorithm. These examples demonstrat...

متن کامل

Do hypercubes sort faster than tree machines?

SUMMARY We develop a balanced, parallel quicksort algorithm for a hypercube and compare it with a similar algorithm for a binary tree machine. The performance of the hypercube algorithm is measured on a Computing Surface.

متن کامل

Chapter 1 An Overview

Separation logic is a novel system for reasoning about imperative programs. It extends Hoare logic with enriched assertions that can describe the separation of storage and other resources concisely. The original goal of the logic was to facilitate reasoning about shared mutable data structures, i.e., structures where updatable fields can be referenced from more than one point. More recently, th...

متن کامل

A Recursive Parallel Quick Sort Algorithm on a Message Passing Machine

Quicksort is one of the most popular algorithms for sequential computers because of its simplicity, low overhead and optimal average complexity. Quicksort algorithm is an ideal candidate for recursive implementation as it is based upon the recursive decomposition of the input data. In this report, I discuss the various issues involved in parallelizing the Quicksort algorithm on a Message Passin...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010